package cn.jianyongjie.controller;

import cn.jianyongjie.domain.User;
import cn.jianyongjie.feignclient.UserFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
* @Description: TODO
* @Author: JianYongJie
* @Version: 1.0
* @Date:  2022/5/30 16:12
*/
@RestController
public class PayController {

    // 注入接口
    @Autowired
    private UserFeignClient userById;

    @GetMapping("/userById/{id}")
    public User orderById(@PathVariable("id") Long id){
        // 调用方法
        return userById.userById(id);
    }

}
